﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="StudyRequest.aspx.cs" Inherits="RenShiKaoQin.Account.StudyRequest" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server" EnableScriptGlobalization="true"
        EnableScriptLocalization="true">
</ajaxToolkit:ToolkitScriptManager>
<div align="center">
 <table border="2" rules="all" cellpadding="5" width="200px"><tr style="font-size:23px;font-weight:bold"><td>个&nbsp;&nbsp;人&nbsp;&nbsp;信&nbsp;&nbsp;息</td></tr></table>
    <table cellpadding="3"><tr align="left"><td>姓名</td><td><asp:Label ID="lbName" runat="server"></asp:Label></td><td>
        性别</td><td>
            <asp:Label ID="lbGender" runat="server"></asp:Label>
        </td><td>出生日期</td><td><asp:Label ID="lbBirthday" runat="server"></asp:Label></td></tr>
    <tr align="left"><td class="style1">所属科室</td><td class="style1">
        <asp:Label ID="lbInDept" runat="server"></asp:Label>
        </td><td class="style1">考勤科室</td>
                <td class="style1"><asp:Label ID="lbDept" runat="server"></asp:Label></td>
        <td class="style1">联系电话</td><td class="style1"><asp:Label ID="lbTel" runat="server"></asp:Label></td></tr>
                <tr align="left"><td>职称资格</td><td>
                    <asp:Label ID="lbZhiChen" runat="server"></asp:Label>
                    </td><td>聘任岗位</td><td>
                    <asp:Label ID="lbGangWei" runat="server"></asp:Label>
                    </td><td>担任职务</td><td><asp:Label ID="lbHeadShip" runat="server"></asp:Label></td></tr></table>
<div id="divZhiNong" style="border:2px solid black;width:400px;font-size:23px;font-weight:bold;height:35px;vertical-align:middle;line-height:35px;cursor:pointer;">学习申请&nbsp;&nbsp;<asp:Label ID="lbZhiNong" runat="server"></asp:Label></div>
<asp:Panel ID="panelZhiNong" runat="server">
<table><tr><td>报考学校</td><td>
    <asp:TextBox ID="tbCollage" runat="server"></asp:TextBox></td><td>报考专业</td><td><asp:TextBox ID="tbSpeciality" runat="server"></asp:TextBox></td><td>报考时间</td><td>
    <asp:TextBox ID="tbStart" runat="server" Width="90px"></asp:TextBox><ajaxToolkit:CalendarExtender ID="CalendarExtender1" TargetControlID="tbStart" runat="server" Format="yyyy-MM-dd" DefaultView="Months"></ajaxToolkit:CalendarExtender></td></tr>
    <tr><td>申请学历</td><td><asp:DropDownList ID="ddlEduLevel" runat="server" 
            DataSourceID="sqlEduLevel" DataTextField="FName" DataValueField="FEduLevelCode" 
            Width="100%"></asp:DropDownList>
        <asp:SqlDataSource ID="sqlEduLevel" runat="server" 
            ConnectionString="<%$ ConnectionStrings:hrdbConnectionString %>" 
            SelectCommand="SELECT FEduLevelCode, FName FROM TDictEduLevel WHERE (FEduLevelCode = '0101') OR (FEduLevelCode = '0102')">
        </asp:SqlDataSource>
        </td><td>申请学位</td><td><asp:DropDownList ID="ddlDegree" runat="server" 
            DataSourceID="sqlDegree" DataTextField="FName" DataValueField="FDegreeCode" 
            Width="100%"></asp:DropDownList>
        <asp:SqlDataSource ID="sqlDegree" runat="server" 
            ConnectionString="<%$ ConnectionStrings:hrdbConnectionString %>" 
            SelectCommand="SELECT FName, FDegreeCode FROM TDictDegree WHERE (LEN(FDegreeCode) = 4) AND (FDegreeCode &lt; '0301')">
        </asp:SqlDataSource>
        </td><td>学习方式</td><td><asp:DropDownList ID="ddlEduType" runat="server" 
            DataSourceID="sqlEduType" DataTextField="FName" DataValueField="FEduTypeCode" 
            Width="100%"></asp:DropDownList>
        <asp:SqlDataSource ID="sqlEduType" runat="server" 
            ConnectionString="<%$ ConnectionStrings:hrdbConnectionString %>" 
            SelectCommand="SELECT FEduTypeCode, FName FROM TDictEduType WHERE (FEduTypeCode LIKE '01%') AND (LEN(FEduTypeCode) = 4) OR (FEduTypeCode = '0203')">
        </asp:SqlDataSource>
        </td></tr>
        <tr><td>学习经历</td><td colspan="5"><asp:TextBox ID="tbEduStory" 
                runat="server" TextMode="MultiLine" Width="100%" Rows="5"></asp:TextBox></td></tr>
        <tr><td>科研情况</td><td colspan="5">
            <asp:TextBox ID="tbResearchStory" 
                runat="server" TextMode="MultiLine" Width="100%" Rows="5"></asp:TextBox></td></tr>
        <tr><td>申请理由</td><td colspan="5"><asp:TextBox ID="tbReason" 
                runat="server" TextMode="MultiLine" Width="100%" Rows="5"></asp:TextBox></td></tr>
                <tr><td colspan="6"><asp:Button ID="btnApply" runat="server" Text="提交并下载申请单" 
                    onclick="btnApply_Click" BorderStyle="None" Width="100%" Font-Size="18px" /></td></tr></table>
    </asp:Panel>
    <ajaxToolkit:CollapsiblePanelExtender runat="server" CollapsedText="（点击展开...）" ID="cpeZhiNong"
        TargetControlID="panelZhiNong" CollapseControlID="divZhiNong" 
        ExpandControlID="divZhiNong" TextLabelID="lbZhiNong" ExpandedText="（点击收起...）" 
            Collapsed="False"></ajaxToolkit:CollapsiblePanelExtender>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <asp:Timer ID="Timer1" runat="server" Interval="10000" ontick="Timer1_Tick">
    </asp:Timer>
    <asp:GridView ID="gvSR" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataKeyNames="SerialNO" DataSourceID="sqlSR" 
        ForeColor="#333333" GridLines="None" Font-Size="15px" 
        onrowdeleting="gvSR_RowDeleting">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="EmployeeName" HeaderText="姓名" 
                SortExpression="EmployeeName" />
            <asp:BoundField DataField="DeptName" HeaderText="科室" 
                SortExpression="DeptName" />
            <asp:BoundField DataField="College" HeaderText="报考学校" 
                SortExpression="College" />
            <asp:BoundField DataField="Speciality" HeaderText="报考专业" 
                SortExpression="Speciality" />
            <asp:BoundField DataField="EnrollDate" HeaderText="报考时间" 
                SortExpression="EnrollDate" DataFormatString="{0:yyyy-MM-dd}" />
            <asp:BoundField DataField="EduLevel" HeaderText="申请学历" 
                SortExpression="EduLevel" />
            <asp:BoundField DataField="Degree" HeaderText="申请学位" 
                SortExpression="Degree" />
            <asp:BoundField DataField="EduType" HeaderText="学习方式" 
                SortExpression="EduType" />
            <asp:TemplateField HeaderText="批准状态" SortExpression="CheckStatus">
                <ItemTemplate>
                <asp:Label ID="lbExamStatus" runat="server" Text='<%# Eval("CheckStatus").ToString().Equals("True")?"已批准":"未批准" %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="拒绝状态" SortExpression="RejectStatus">
                <ItemTemplate>
                    <asp:Label ID="lbExamStatus" runat="server" Text='<%# Eval("RejectStatus").ToString().Equals("True")?"已拒绝":"未拒绝" %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="RejectReason" HeaderText="拒绝原因" 
                SortExpression="RejectReason"><ItemStyle Width= "80px" /></asp:BoundField>
            <asp:ButtonField HeaderText="撤销" Text="撤销" CommandName="Delete" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:SqlDataSource ID="sqlSR" runat="server" 
        ConnectionString="<%$ ConnectionStrings:hrdbConnectionString %>" 
        
        
        SelectCommand="SELECT TKQStudyRequest.SerialNO, TKQStudyRequest.FEmployeeID, TKQStudyRequest.DeptCode, TKQStudyRequest.College, TKQStudyRequest.Speciality, TKQStudyRequest.EnrollDate, TKQStudyRequest.EduLevelCode, TKQStudyRequest.DegreeCode, TKQStudyRequest.EduTypeCode, TKQStudyRequest.EduStory, TKQStudyRequest.ResearchStory, TKQStudyRequest.Reason, TEmployee.FName AS EmployeeName, TDictDept.FName AS DeptName, TKQStudyRequest.CheckStatus, TDictEduLevel.FName AS EduLevel, TDictDegree.FName AS Degree, TDictEduType.FName AS EduType, TKQStudyRequest.RejectStatus, TKQStudyRequest.RejectReason FROM TKQStudyRequest INNER JOIN TEmployee ON TKQStudyRequest.FEmployeeID = TEmployee.FEmployeeID INNER JOIN TDictDept ON TDictDept.FDeptCode = TKQStudyRequest.DeptCode INNER JOIN TDictEduLevel ON TKQStudyRequest.EduLevelCode = TDictEduLevel.FEduLevelCode INNER JOIN TDictDegree ON TKQStudyRequest.DegreeCode = TDictDegree.FDegreeCode INNER JOIN TDictEduType ON TKQStudyRequest.EduTypeCode = TDictEduType.FEduTypeCode WHERE (TKQStudyRequest.FEmployeeID = @FEmployeeID)"
        DeleteCommand="DELETE FROM TKQStudyRequest WHERE (SerialNO = @SerialNO)">
        <DeleteParameters>
            <asp:Parameter Name="SerialNO" />
        </DeleteParameters>
        <SelectParameters>
            <asp:Parameter Name="FEmployeeID" />
        </SelectParameters>
    </asp:SqlDataSource>
    </ContentTemplate>
    </asp:UpdatePanel>
    <asp:HiddenField ID="hfDeptCode" runat="server" />
    <asp:HiddenField ID="hfIntoHisDate" runat="server" />
    <asp:HiddenField ID="hfFirstJobDate" runat="server" />
</div>
</asp:Content>
